#include <QString>
#include <iostream>
#include "objectTreeItem.h"

ObjectTreeItem::ObjectTreeItem(QTreeWidgetItem *_parentItem, Object *_obj) : TreeItem(_parentItem), object(_obj){
    setExpanded(true);

    QString str;

    switch(_obj->getType())
    {
        case SPHERE:
            str = "Esfera ";
            break;
        case TABLE:
            str = "Mesa ";
            break;
        default:
            str = "Objeto ";
            break;
    }

    str.append(QString::number(object->getID()));
    setText(0, str);
}

ObjectTreeItem::~ObjectTreeItem(){
//    for(int i = 0; i < childCount(); i++)
//        delete child(i);
}
